

times = cell(1,3);

times {1} = global_times_rand_1M;
times {2} = global_times_inc_1M;
times {3} = global_times_dec_1M;

hold on

global_times_mean = mean(times{1},1)
global_times_std = std(times{1},1)


figure(2);
plot(x_axis,global_times_mean,'-o', 'linewidth',2)
axis([-0.1 max(x_axis)+1 0 1.2*max(global_times_mean)]) 
xlabel('# of threads');
ylabel('time (ms)');
hold on
%errorbar(0:8,global_times_mean,global_times_std,'b.','linewidth',1);



global_times_mean = mean(times{2},1)
global_times_std = std(times{2},1)
plot(x_axis,global_times_mean,'m-o', 'linewidth',2)
%errorbar(0:8,global_times_mean,global_times_std,'m.','linewidth',1);


global_times_mean = mean(times{3},1)
global_times_std = std(times{3},1)
plot(x_axis,global_times_mean,'g-o', 'linewidth',2)
%errorbar(0:8,global_times_mean,global_times_std,'g.','linewidth',1);

legend('rand','inc','dec')

global_times_mean = mean(times{1},1)
global_times_std = std(times{1},1)
errorbar(0:8,global_times_mean,global_times_std,'b.','linewidth',1);

global_times_mean = mean(times{2},1)
global_times_std = std(times{2},1)
errorbar(0:8,global_times_mean,global_times_std,'m.','linewidth',1);

global_times_mean = mean(times{3},1)
global_times_std = std(times{3},1)
errorbar(0:8,global_times_mean,global_times_std,'g.','linewidth',1);
